<template>
  <div>
    <div class="head">
      <p class="text">设置密码</p>
      <van-icon
        @click="onClickLeft()"
        size="20"
        color="whitesmoke"
        name="arrow-left"
        class="icon"
      />
    </div>
    <br />
    <p class="p1">设置密码</p>
    <br />
    <br />
    <van-form @submit="onSubmit">
      <van-field
        v-model="user_tel"
        name="密码"
        label="密码"
        placeholder="密码"
        :rules="[{ required: true, message: '请输入密码' }]"
      />
      <van-field
        v-model="sms"
        center
        clearable
        label="密码"
        placeholder="请确认密码"
      >
      </van-field>
      <div style="margin: 16px">
        <van-button round block type="info" native-type="submit">
          确认修改
        </van-button>
      </div>
    </van-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      user_tel: '',
      sms: '',
    };
  },
  methods: {
    onSubmit(values) {
      console.log('submit', values);
    },
    onClickLeft() {
      this.$router.push('/change');
    },
  },
};
</script>
<style scoped>
.head {
  width: 100%;
  height: 4rem;
  background-color: rgb(108, 144, 243);
}
.text {
  text-align: center;
  font-size: 1.6rem;
  color: whitesmoke;
  line-height: 4rem;
}
.icon {
  position: absolute;
  top: 1.1rem;
}
.p1 {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  color: rgb(51, 51, 51);
}
.p2 {
  font-size: 1.3rem;
  text-align: center;
}
.p3 {
  color: #1989fa;
  text-align: center;
}
</style>